<template>
    <a-table bordered :columns="columns" :data-source="dataSource" >
        <template slot="action">
            <slot name="table-action">
                <a>删除</a>
            </slot>
        </template>
    </a-table>
</template>

<script>
    const columns = [
        {key:"date", dataIndex:"date", title:"备份日期", width: "20%", scopedSlots:{customRender:"date"} },
        {key:"desc", dataIndex:"desc", title:"备份说明" },
        {key:"action",  title:"操作", scopedSlots:{customRender:"action"} },
    ];
    const dataSource = [
        {date: "2020-08-29", desc:"定时备份"},
        {date: "2020-08-22", desc:"定时备份"},
        {date: "2020-08-15", desc:"定时备份"},
        {date: "2020-08-08", desc:"定时备份"},
    ]
    export default {
        name: "dbbackup-table",
        data(){
            return {
                columns,
                dataSource
            }
        }
    }
</script>

<style scoped>

</style>